package com.cmsky.open.user.enums;

public enum UserState {
	InValid(0),Registed(1),Configed(2),Stopped(3),Destroyed(4);
	private Integer value;

	public Integer getValue() {
		return value;
	}

	private UserState(Integer value) {
		this.value = value;
	}
	/**
	 * 根据value获取枚举对象
	 * @param val
	 * @return
	 */
	public static UserState getByValue(Integer val){
		UserState state = InValid;
		for(UserState s : UserState.values()){
			if(s.getValue() == val){
				state = s;
				break;
			}
		}
		return state;
	}
}
